import request from '@/utils/request'

// 获取机构详情
export const getOrgDetailAPI = (id) => {
  return request({
    url: '/manager/business-hall/' + id,
    method: 'get'
  })
}

// 获取树状机构数据
export const getOrgTreeAPI = () => {
  return request({
    url: '/manager/business-hall/tree',
    method: 'get'
  })
}

// 根据机构查询员工
export const getScopeEmployeeAPI = (page, pageSize, agencyId) => {
  return request({
    url: '/manager/business-hall/user/page',
    method: 'get',
    params: {
      page,
      pageSize,
      agencyId
    }
  })
}

// 获取行政机构消息
export const getAreaAPI = (parentId) => {
  return request({
    url: '/manager/areas/children',
    method: 'get',
    params: {
      parentId
    }
  })
}
